package com.pithypan.mapper;

import com.pithypan.entity.EmailCode;
import com.pithypan.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 邮箱验证码 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2023-08-24
 */
@Mapper
public interface EmailCodeMapper {

    //添加
    public void insertOne(EmailCode emailCode);

    //将该邮箱发送的所有验证码重置为已使用状态
    public void disableEmailCode(@Param("email") String email);

    //根据邮箱和验证码和验证码查找
    public EmailCode selectByEmailAndCode(@Param("email") String email, @Param("code") String code);
}
